package app.htby.utils;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class SocketUtils {
	
	/** 分发系统的标记 */
	public static String DIS_CONFIG_MARK = "DIS_CONFIG_NIO";
	/** 分发系统的开始的状态 */
	public static String DIS_START_STATE = "0";
	/** 分发系统的断线后的状态 */
	public static String DIS_RECONNECT_MANAGE = "1";
	
	/** 断线重连，间隔时间 interval间隔 */
	public static Integer NIO_RECONNECT_INTERVAL_TIME = 5000;
	
	/** web端的IP */
	public static String WEB_SERVER_IP;
	/** web端的PORT */
	public static Integer WEB_SERVER_PORT;
	
	
	@Value("${sysconfig.webServer.socketIp}")
	public void setSocketIp(String socketIp) {
		SocketUtils.WEB_SERVER_IP = socketIp;
	}
	
	@Value("${sysconfig.webServer.socketPort}")
	public void setSocketPort(String socketPort) {
		SocketUtils.WEB_SERVER_PORT = Integer.parseInt(socketPort);
	}
}
